;s is program counts from 10 to 0
		.ORIG x3000
		LEA R0, TEN			
		LDW R1, R0, #0
		LDB R2, R0, #1
		LDW R3, R0, #1
		LEA R4, LABLELEA
		LDB R5, R4, #-1
		LDB R6, R4, #-2
START   ADD R1, R1, #-1
		BRZ DONE
		BR START
    	ADD R7, R0, #-5
		ADD R2, R3, #7        
DONE	AND R2, R3, R4    
		AND R0, R3, #-4       
		
		;
        BRN N           
N		BRZ Z          
Z		BRP P           
P		BR  U       
U		BRZP ZP         
ZP		BRNP NP         
;NP		BRNZ NZ        
;NZP	BRNZP NZP       
		;
;		JMP R0               
;		RET                   
;		;
;		JSR LJSR         
;		JSRR R0        
;		NOT R4, R2        
		;
		LSHF R2,R3, #3       
		RSHFL R2, R3, #3     
		RSHFA R2,R3, #3   
		;
LJSR	STB R2, R4, #1      
		STW R2, R4, #1    
		;
		XOR R3, R1, R2       
NZ		XOR R3, R1, #12       
		NOT R3, R1           

        TRAP x25			;The last excutable instruction
		
TEN  		.FILL X00A			;This is 10 in 2's comp, hexadecimal
LABLEN      .FILL XABCD 
LABLEZ      .FILL X2
LABLEP      .FILL X3 
LABLENZPU   .FILL X4 
LABLEZP     .FILL X5 
LABLENP     .FILL X6
LABLENZ     .FILL X7 
LABLENZP    .FILL X8 
LABLEJSR    .FILL X9 
LABLELEA    .FILL XB 
             .END    
